//
//  UITextFieldAdditions.m
//  MClient
//
//  Created by  史正烨 on 11-3-21.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "UITextFieldAdditions.h"


@implementation UITextField(MCAddition)


- (char) fieldType {
	UILabel* label = (UILabel*)[self viewWithTag:-1254];
	return [label.text characterAtIndex:0];
}
- (void) setFieldType:(char)type {
	UILabel* label = (UILabel*)[self viewWithTag:-1254];
	if (!label) {
		label = [[UILabel alloc] initWithFrame:CGRectZero];
		label.hidden = YES;
		label.tag = -1254;
		[self addSubview:label];
		[label release];
	}
	label.text = [NSString stringWithFormat:@"%c", type];
}


@end
